<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <title>游乐淘充值中心</title>
    <meta name="description" content="">
    <meta name="description" content="">
    <meta name="keywords" content="">
    <link href="http://pay.zyttb.com/Public/Pay/Css/pay/foot.css" rel="stylesheet">
    <link href="http://pay.zyttb.com/Public/Pay/Css/pay.css" rel="stylesheet" type="text/css">
    <script type="text/javascript" src="http://pay.zyttb.com/Public/Pay/Js/jquery.js"></script>
    <script type="text/javascript" src="/Public/Layer/layer.js"></script>
</head>
<body>
<noscript>您的浏览器不支持JS，将无法看到通过JS实现的效果</noscript>
<!-- header -->
<div class="pay_header">
    <div class="header_conn">
        <a href="<?php echo ($platform_url); ?>" target="_self" class="platform_logo" title="游乐淘">游乐淘平台</a>
        <a href="<?php echo U('Pay/Main');?>" class="pay_logo" title="游乐淘充值中心">游乐淘充值中心</a>
    </div>
</div>
<div class="wrap">
  <div class="frame_content">
    <div class="user_wrap">
    <!--用户信息-->
    <div class="js_user_con">
        <div class="common_userInfo">
            <div class="userInfo_box">
                <div class="userInfo_conn">
                    <div class="userInfo_name">
                        <?php if(empty($user)): ?>您好,
                        <a href="<?php echo ($login_url); ?>">[登录]</a>
                        <a href="<?php echo ($reg_url); ?>">[注册]</a>
                        <?php else: ?>
                        您好 , <?php echo ($user["user_name"]); ?><br /><a href="javascript:;" id="logout">[注销]</a><?php endif; ?>
                    </div>
                </div>
            </div>
        </div>
        <!--用户信息-->
        <?php if(empty($user)): $style = ' style="display:none;"'; ?>
        <?php else: ?>
            <?php $style = ''; endif; ?>
        <div class="user_account"<?php echo ($style); ?>>
            <div class="tt">账户余额：</div>
            <ul class="account_info">
                <li><span><em><i class="ico_ico ico_360"></i>通币余额&nbsp; </em><i class="js_refresh_con" style="">&nbsp;&nbsp;&nbsp;<b id="tb_acc" class="tb c_org"><?php echo ($user["user_tb"]); ?></b>&nbsp;通币</i></span></li>
                <li><span><em><i class="ico_ico ico_360"></i>通豆余额&nbsp; </em>&nbsp;&nbsp;&nbsp;<b id="cash_acc" class="cash c_org"><?php echo ($user["user_ye"]); ?></b>&nbsp;通豆</span></li>
            </ul>
        </div>
    </div>
</div>
    <div class="frame_conn clearfix">
      <div class="frame_left">
    <!--left-->
    <ul class="left_nav js_left_nav">
        <?php if($pay_method == 'alipay'): $cur_alipay = ' cur'; ?>
        <?php else: ?>
            <?php $cur_alipay = ''; endif; ?>
        <li class="apay<?php echo ($cur_alipay); ?>" ><i class="ico_ico ico_ali"></i>
            <a href="<?php echo U('/Pay/Main?method=alipay');?>"><strong>支付宝</strong></a>
        </li>

        <?php if($pay_method == 'tb'): $cur_tb = ' cur'; ?>
        <?php else: ?>
            <?php $cur_tb = ''; endif; ?>
        <li class="js_qcoin<?php echo ($cur_tb); ?>"> <i class="ico_ico ico_360"></i>
            <p><a href="<?php echo U('/Pay/Main?method=tb');?>"><strong>通币余额支付</strong></a></p>
        </li>
    </ul>
    <!--/left-->
</div>
      <div class="frame_right">
        <form action="<?php echo U('/Pay/Order');?>" method="post" id="pay-form">
          <?php if($pay_method == 'alipay'): $show_charge_to = '' ?>
          <?php else: ?>
            <?php $show_charge_to = ' style="display:none;"'; endif; ?>
            <!-- charege_to -->
            <div class="pay_rconn js_pay_rconn"<?php echo ($show_charge_to); ?>>
              <div class="tit_a" style="text-align:left;font-size:14px;"><span>充值到哪里：</span><label><input type="radio" value="game" class="charge-to" name="charge_to" checked="checked" /><abbr>默认充值到游戏</abbr></label>&nbsp;&nbsp;&nbsp;&nbsp;<label><input type="radio" value="tb" class="charge-to" name="charge_to" /><abbr>充值到通币</abbr></label></div>
            </div>
            <!--/charge-to-->
          <div class="pay_rconn tb-alert" id="tb-alert">
            通币是游乐淘平台的虚拟货币，可用于充值游乐淘平台上任何一款游戏。
          </div>
        <ul class="pay_sel" id="game-selector">
          <li class="cur--"> <a href="#" class="sel_item js_game_btn" title="选择充入的游戏">选择充入的游戏</a> 
            <!--充入游戏layer-->
            
            <div class="pay_layer js_game" style="display:none;"> <s></s> <a href="#" class="close js_list_close" title="关闭">关闭</a>
              <div class="pay_layer_t clearfix">
                <ul class="js_game_tab">
                  <li class="search i2 active">ABCD</li>
                  <li class="search">EFGH</li>
                  <li class="search">IJKL</li>
                  <li class="search">MNOP</li>
                  <li class="search">QRST</li>
                  <li class="search">UVWX</li>
                  <li class="search">YZ</li>
                </ul>
              </div>
              <div class="pay_layer_conn pay_layer_selconn">
                <div class="pay_sel_scroll scroll_game">
                  <div class="pay_layer_sel p_texta viewport">
                    <ul class="js_gameli overview" style="position: relative; top: 0px;"></ul>
                  </div>
                </div>
              </div>
            </div>
            <!--/充入游戏layer--> 
          </li>
          <li class="lst cur--"> <a href="#" class="sel_item js_server_btn" title="选择游戏服务器">选择游戏服务器</a> 
            <!--服务器layer-->
            <div class="pay_layer js_server" style="display: none;"> <s></s> <a href="#" class="close js_list_close" title="关闭">关闭</a>
              <div class="pay_layer_t clearfix">
                <ul class="js_server_tab">
                  <li class="i1 active js_allserver">全部区服</li>
                </ul>
              </div>
              <div class="pay_layer_conn pay_layer_selconn">
                <div class="pay_sel_scroll scroll_server">
                  <div class="pay_layer_sel p_texta viewport">
                    <ul class="overview js_serverli" style="position:relative;"></ul>
                  </div>
                </div>
              </div>
            </div>
            <!--/服务器layer--> 
          </li>
          <li class="err"></li>
        </ul>
        <?php if($pay_method == 'tb'): ?><!-- pay_type -->
          <div id="pay-type" class="pay_rconn js_pay_rconn">
            <div class="tit_a" style="text-align:left;font-size:14px;"><span>选择充值类型：</span><label><input type="radio" value="tb" class="tb-charge" name="charge_type" checked="checked" /><abbr>通币充值</abbr></label>&nbsp;&nbsp;&nbsp;&nbsp;<label><input type="radio" value="ye" class="ye-charge" name="charge_type" /><abbr>通豆充值</abbr></label></div>
          </div><?php endif; ?>
        <!--/pay_sel-->
        <div class="pay_rconn js_pay_rconn"><!--选择充值金额-->
            <input type="hidden" name="pay_method" value="<?php echo ($pay_method); ?>" />
            <input type="hidden" id="gid" name="gid" value="" />
            <input type="hidden" id="sid" name="sid" value="" />
            <input type="hidden" id="pcd" name="pcd" value="" />
            <input type="hidden" id="scd" name="scd" value="" />
            <h4 class="tit_a"><span>选择充值金额：</span></h4>
            <div class="pay_money_conn">
              <ul class="js_money_con">
                <li class="cur">
                  <label>
                    <input name="order_amount" type="radio" value="10" class="input_chk">
                    10元</label>
                </li>
                <li class="cur">
                  <label>
                    <input name="order_amount" type="radio" value="20" class="input_chk">
                    20元</label>
                </li>
                <li class="cur">
                  <label>
                    <input name="order_amount" type="radio" value="50" class="input_chk">
                    50元</label>
                </li>
                <li class="cur">
                  <label>
                    <input name="order_amount" type="radio" value="100" class="input_chk">
                    100元</label>
                </li>
                <li class="cur">
                  <label>
                    <input name="order_amount" type="radio" value="500" class="input_chk">
                    500元</label>
                </li>
                <li class="cur">
                  <label>
                    <input name="order_amount" type="radio" value="1000" class="input_chk">
                    1000元</label>
                </li>
                <li class="cur">
                  <label>
                    <input name="order_amount" type="radio" value="2000" class="input_chk">
                    2000元</label>
                </li>
                <li class="cur">
                  <label>
                    <input name="order_amount" type="radio" value="3000" class="input_chk">
                    3000元</label>
                </li>
                <li class="cur">
                  <label>
                    <input name="order_amount" type="radio" value="5000" class="input_chk">
                    5000元</label>
                </li>
                <li class="cur">
                  <label>
                    <input name="order_amount" type="radio" value="8000" class="input_chk">
                    8000元</label>
                </li>
                <li class="cur">
                  <label>
                    <input name="order_amount" type="radio" value="10000" class="input_chk">
                    10000元</label>
                </li>
                <li class="cur">
                  <label>
                    <input name="order_amount" type="radio" value="0.01" class="input_chk">
                    测试</label>
                </li>
                <li class="lst">
                  <label>
                    <input name="order_amount" type="radio" value="other" class="input_chk js_other">
                    其他:</label>
                  <input name="order_money" class="js_input_txt input_txt" type="text" value="" placeholder="请填写10到1000000之间的整数">
                </li>
              </ul>
              <div id="game_currency" style="text-align: left;font-size: 14px;display:none;">
                <input type="hidden" id="rate" value="0" />
                对应<span id="currency_name">游戏币</span>数量为：<span id="currency_amount">0</span>
                <span id="currency_proportion" style="color: #f00; padding-left: 10px;">[兑换比例<span id="currency_ratio">1:10</span>]</span>
              </div>
            </div>
            <!--/选择充值金额-->
            <input type="hidden" value="<?php echo ($hash); ?>" name="hash" />
            <div class="pay_btnbox js_submit"><a href="#" class="btn_btn btn_pay" title="立即支付">立即支付</a></div>
        </div>
        </form>
      </div>
    </div>
  </div>
  <script type="text/javascript" src="http://pay.zyttb.com/Public/Pay/Js/game_select.js"></script>
  <!--标准尾-->
<footer class="foot">
    <div class="foot_center">Copyright©2014-2016 zyttb.com All Rights Reserved 中云通科技股份有限公司<br>
        粤ICP备14011508号-3 </div>
</footer>
<!--/标准尾-->
<script type="text/javascript" src="http://pay.zyttb.com/Public/Pay/Js/jquery.zyt.min.js"></script>
<script type="text/javascript">
$.zyt.config({
    server: '<?php echo C('SSO_SERVER');?>',
    verifyToken: 'http://sso.zyttb.com/Login/verifyToken',
    clearToken: 'http://sso.zyttb.com/Login/clearToken',
    login: function(uid){
        $.ajax({
            type: 'post',
            url:  '/User/Login',
            data: {uid: uid},
            success: function(data){
                $('.userInfo_name').html('您好，'+data.user_name+'<br /><a href="javascript:;" id="logout">[注销]</a>');
                $('#tb_acc').html(data.user_tb);
                $('#cash_acc').html(data.user_ye);
                $('.user_account').show();
                $('#logout').click(function(){
                    $.zyt.logout();
                });
            }
        });
    },
    logout: function(){
        $.ajax({
            type: 'GET',
            url:'/User/Logout',
            success: function(){
                $('.userInfo_name').html('您好，<a href="<?php echo ($login_url); ?>">[登录]</a><a href="<?php echo ($reg_url); ?>">[注册]</a>');
                $('#tb_acc').html('0');
                $('#cash_acc').html('0');
                $('.user_account').hide();
            }
        })
    }
});

$.zyt.login();
$('#logout').click(function(){
    $.zyt.logout();
});
</script>

</div>
</body>
</html>